<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%user_case}}".
 *
 * @property integer $id
 * @property integer $user_id
 * @property string $diagnosis
 * @property string $sick_time
 * @property string $medical_history
 * @property string $irritability_history
 * @property string $family_history
 * @property string $hobby
 * @property string $address
 */
class UserCase extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%user_case}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id'], 'required'],
            [['user_id'], 'integer'],
            [['diagnosis', 'sick_time', 'medical_history', 'irritability_history', 'family_history', 'hobby', 'address'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'diagnosis' => '临床诊断',
            'sick_time' => '患病时间',
            'medical_history' => '既往病史',
            'irritability_history' => '过敏史',
            'family_history' => '家族病史',
            'hobby' => '个人嗜好',
            'address' => '长期居住地',
        ];
    }
}
